import request from '@/utils/request'
// 营业额数据
// export const getTurnoverDataes = (data) =>
//   request({
//     'url': `/report/turnoverStatistics`,
//     'method': 'get',
//     data
//   })
// 首页数据
// // 今日数据
export const getDate = () =>
  request({
    url: `/background/workspace/businessData`,
    method: 'get'
  })
// 订单管理
export const getOrderData = () =>
  request({
    url: `/background/workspace/overviewOrders`,
    method: 'get'
  })
// 菜品总览
export const getOverviewDishes = () =>
  request({
    url: `/workspace/overviewDishes`,
    method: 'get'
  })
// 套餐总览
export const getSetMealStatistics = () =>
  request({
    url: `/workspace/overviewSetmeals`,
    method: 'get'
  })
// 营业数据
export const getBusinessData = () =>
  request({
    url: `/workspace/businessData`,
    method: 'get'
  })
/**
 *
 * 报表数据
 *
 **/
// 统计
// 获取当日销售数据 -> 顶部数据
// export const getDataes = (params: any) =>
//   request({
//     'url': `/report/amountCollect/${params.date}`,
//     'method': 'get'
//   })

// 营业额统计
export const getTurnoverStatistics = (params: any) =>
  request({
    url: `/background/report/turnoverStatistics`,
    method: 'get',
    params
  })

// 用户统计
export const getUserStatistics = (params: any) =>
  request({
    url: `/background/report/userStatistics`,
    method: 'get',
    params
  })
// 订单统计
export const getOrderStatistics = (params: any) =>
  request({
    url: `/background/report/ordersStatistics`,
    method: 'get',
    params
  })
// 销量排名TOP10
export const getTop = (params: any) =>
  request({
    url: `/background/report/top10`,
    method: 'get',
    params
  })
// 数据概览
export const getDataOverView = (params: any) =>
  request({
    url: `/report/dataOverView`,
    method: 'get',
    params
  })
// 导出
export function exportInfor() {
  return request({
    url: '/background/report/export',
    method: 'get',
    responseType: 'blob'
  })
}
